1. Field of the Invention
This invention relates to a method for predicting and avoiding danger in execution environment to stably operate an application program, and more specifically to the method for predicting and avoiding danger in execution environment by monitoring a status of the execution environment of an intermediate layer arranged on a server during an operation of the application and avoiding a dangerous state of the execution environment in a 3-layer system comprising a client layer, an intermediate layer, and a database layer, which make an enterprise application, thereby successfully operating the application with stability.
2. Description of the Related Art
The above mentioned enterprise application may be a Web application that mainly uses Java (registered trademark). The structure of the above mentioned enterprise application may also be a 4-layer system in which the intermediate layer are further divided into 2-layer. An execution environment of the intermediate layer arranged on the server may be a Java virtual machine, etc. The present invention is applied an execution system such as Java which has a memory management function such as garbage collection.
Java is used as an example for explanation below. FIG. 1 shows an example of an operation environment of a Java application. In the example shown in FIG. 1, data is collected which are in operating an application in an execution environment 1000 of a Java application, and the collected data is analyzed by a performance analysis tool 2000. By feeding back an analysis result from the performance analysis tool 2000 to the execution environment 1000 of a Java application, the most suitable operation environment of the optimum Java application can be structured.
In the execution environment 1000 of a Java application, a Java virtual machine 1020 is arranged in an upper layer of an OS 1010, and an application server 1030 is arranged in an upper layer of the Java virtual machine 1020. An example of the application server 1030 may be an EJB container and a Servlet container, which are programs for operating an EJB (enterprise JavaBeans) and a Servlet, respectively. In the upper layer of the application server 1030, an application 1040 such as the Servlet, a JSP (Java server pages), and the EJB, etc. operates. A Web server 1050 accepts a request from a client. What best understands the operation status of the Java application is the Java virtual machine 1020 which is arranged in the bottom layer of the execution environment 1000 and actually executes an application.
In the performance analysis tool 2000, the data collected from the execution environment 1000 is accumulated in a performance database 2010, and the accumulated data is analyzed by an analysis program 2020. An analysis result is displayed on a monitoring tool 2030 and more precisely analyzed by a drill down tool 2040. Additionally, a service level diagnosis (tool) 2050 makes a diagnosis such as whether or not the server determines replies to the request from a client within a predetermined time, or whether or not the status of the current service has been satisfied.
FIG. 2 shows an example of a method for analyzing an operation environment of the conventional Java application. In FIG. 2, the data collected from a server 3000 for operating a Java application (a server having the execution environment 1000 of a Java application) is accumulated in a data accumulation device 3010 which has the performance database 2010. A performance analysis device 3020 refers to the data accumulated in the data accumulation device 3010, and analyzes the data using the analysis program 2020. An operation administrating person 3030 uses the performance analysis device 3020 to display an analysis result with a graph by using the monitoring tool 2030, to perform a detailed analysis by using the drill down tool 2040, and to diagnose a service level by using the service level diagnosis 2050.
The conventional technologies relating to the safe operation of an enterprise application are listed below.
(First Conventional Technology)
There is a technology in which an operation administrating person monitors a service throughput and a system performance on the server by a monitoring tool. This technology analyzes measured data, predicts and detects a sign of trouble by using a threshold, and notifies the operation administrating person of the sign. Further, this technology analyzes the measured data by using an analyzing tool, and then, based on the analysis, makes a graph of the operation status and evaluated it, and analyzes performance data in detail (drill down), thereby this technology supports to specify a bottleneck of a lowering of performance etc. The example in FIG. 2 is an example of the first conventional technology.
The throughput of the service may be how many second is needed to response to the request from the client. The system performance on the server may be the CPU use rate, the memory use amount, the network use rate, etc.
The documents listed below describes the first conventional technology:
Non-patent Document 1; Systemwalker, Performance Management Product, Fujitsu Limited (URL (old): http://systemwalker.fujitsu.com/jp/com/conc/pafo.html or URL (new): http://systemwalker.fujitsu.com/jp/perfmgr/),
Non-patent Document 2; System Management/Tivoli, Performance & Availability Product, Japan IBM, (URL: http://www-6.ibm.com/jp/software/tivoli/products/index.html#per), and
Non-patent Document 3; Precise/Indepth for J2EE, Nikki Information Software (URL (old): http://www/jsys-products.com/product/pre_ind_j2ee/document. html or URL (new): http://www.cosmos.jp/data/indepth_j2ee.pdf).
(Second Conventional Technology)
There is a technology in which the processing time of services such as Servlet, EJB, etc. is measured in the environment in which servers have different levels of throughput, and a high-speed processing server is automatically selected and allotted to a request from a client, thereby efficiently performing the process of the entire system.
The document listed below describes the second conventional technology:
Non-patent Document 4; IBM eServer, Work Load Management Among Different Models, Japan IBM (URL: http://www-6.ibm.com/jp/servers/eserver/ac/tech/index2—1.html)
(Third Conventional Technology)
There is a technology in which, using the API (application program interface) for checking the memory capacity of Java, the size of the memory (heap) managed by the Java virtual machine is periodically checked to detect memory shortage. In this technology, when free space of memory is smaller than a threshold, garbage collection is forced, thereby supporting the recovery of the free space of memory.
The document listed below describes the third conventional technology:
Non-patent Document 5; WebLogic Server, Tuning of Java Virtual Machine, Automatic Detection of Low Memory Status and Forcing Garbage Collection, Japan BEA Systems (URL (old) : http://edocs,beasys.co.jp/e-docs/wls/docs70/perform/JVMTuning.html.#489159 or URL (new): http://edocs.beasys.co.jp/e-docs/wls/docs70/perform/JVMTuning.html).
(Fourth Conventional Technology)
There is a technology in which an event generated in a Java virtual machine is measured by Java virtual machine profiler interface, and then, based on the result, a detection is performed to detect a method taking a long execution time (bottleneck), to detect an object having a danger of a memory leak, and to detect a thread having a danger of a deadlock.
An event measured by a Java virtual machine profiler interface may be “Garbage collection has been started/terminated”, “Java method has been started/terminated”, “An object has been assigned/released”, and “The status of a Java thread has changed”, etc.
However, the conventional technology relating to the stable operation of the above mentioned enterprise application has the following problems
(Problems with the First Conventional Technology)
In the first conventional technology, a monitoring tool is used for collecting various data and graphing the data, but requires the interference of an operating person in predicting and avoiding trouble. Therefore, it lacks timeliness and autonomy. Especially, the analysis method using the drill down tool thoroughly lacks timeliness. Furthermore, in many cases, although data collection, service level diagnosis (analysis), and notification of a warning may be automatically performed, countermeasures to be taken after receiving a notification have not been automatically realized. Additionally, conditions for the amount of data to be collected and about when data is to be analyzed, etc. have affected the danger detection timing.
(Problems with the Second Conventional Technology)
In the second conventional technology, processes are automatically performed. However, it is only a system of the load balance of distributing a load by measuring the service time, so that it is not a technology of analyzing various collected data to find the factor of a danger.
(Problems with the Third Conventional Technology)
In the third conventional technology, although processes are automatically performed, there have been problems with the algorithm for predicting a trouble. A memory (heap) shortage of a Java virtual machine is a main factor of the trouble. However, correct judgment cannot necessarily be made only by detecting an insufficient heap by comparing available capacity with a threshold.
When a heap becomes short, a Java virtual machine automatically performs garbage collection to recover memory. However, the third conventional technology is designed to recover memory in the preceding stage using forcible garbage collection. The technology may be effective in a case that a memory use amount gradually increases after the memory use amount exceeds a threshold, and it takes relatively a long time until garbage collection is automatically performed.
However, the situation depends on each case. For example, when an absolute amount of memory becomes short and the frequency of the garbage collection is high, the garbage collection continuously occurs although the garbage collection is forcibly performed. As a result, the garbage collection is repeatedly performed, load of which is high.
(Problems with the Fourth Conventional Technology)
In the fourth conventional technology, the frequency of issuing an event provided by Java virtual machine profiler interface is very high, so that an excess load is occurred to a Java virtual machine. Furthermore, since a predetermined interface is used, the information required to detect a danger lacks, or the flexibility of a desired process is limited. A number of tools, which detect a sequence call (bottleneck) having a high CPU use rate or a memory leak, use a profiler interface. However, the tools are subject to a relatively high load, and are to be used not in the application operation but at a test stage.
To solve the above mentioned problems of the conventional technology, to stably operate an application, and to realize a mission-critical system, it is necessary to detect and avoid a danger of trouble before an abnormal condition occurs. Accordingly, it is required that the following conditions should be filled in the period from the detection of the danger to the avoidance thereof.    (1) A load of collecting data for prediction of trouble is to be reduced and no load is allowed for the operation of an application.    (2) Appropriate determination material and algorithm are used to predict trouble for realizing correct prediction.    (3) The process of measuring data, predicting, notifying, and avoiding trouble is to be performed timely and in a short time. Furthermore, it is desired to automatically (autonomically) perform these steps.